home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / util / misc / DragBox.lha / DragBox.txt < prev    next >
Text File  |  1999-02-08  |  11KB  |  332 lines

  1.  
  2. -DragBox- v1.8 (08.02.19999)
  3.  
  4. Introduction
  5. ************
  6.  
  7. You can open all windows with dragging them to the place you want
  8. before the window itself are opened.
  9.  
  10.  
  11. Distribution
  12. ************
  13.  
  14.    Copyright (C) 1998-1999 Juha 'Asa' Pinola
  15.  
  16.    DragBox is available as freeware.  That is, it may be freely distributed
  17. in  unmodified  form  with  no changes what so ever, but you may not charge
  18. more than  a nominal fee covering distribution costs.  However, donations
  19. are welcome.
  20.  
  21.    If  you use this software in a commercial or shareware software product,
  22. please   consider  giving  the  author  and  preferably  each  one  of  the
  23. contributors an original or registered version of your work.
  24.  
  25.    If you wish to distribute this software with a hardware product, contact
  26. the author.  Distribution of DragBox with hardware products is not free.
  27.  
  28.    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
  29. EXPRESS  OR  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  30. WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR A PARTICULAR PURPOSE ARE
  31. DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
  32. DIRECT,  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  33. (INCLUDING,  BUT  NOT  LIMITED  TO,  PROCUREMENT  OF  SUBSTITUTE  GOODS  OR
  34. SERVICES;  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  35. CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT, STRICT
  36. LIABILITY,  OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  37. OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  38. DAMAGE.
  39.  
  40. ****************************************
  41.  
  42.  
  43. Installing
  44. ----------
  45.  
  46. Just copy DragBox to c:DragBox or somewhere else.
  47.  
  48. And try run the included DragShell.info from its icon
  49. and see what this program does.
  50.  
  51. For faster response insert a line:
  52. "resident c:dragbox pure >nil:"    to your s:startup-sequence
  53. or s:user-startup
  54.  
  55. Works fine on any 68k CPUs.
  56.  
  57. (if doesn't work with KS2.? or lower, please let me know)
  58.  
  59. ****************************************
  60.  
  61.  
  62. The Author
  63. ----------
  64.  
  65.    The author can be reached at the following addresses:
  66.  
  67. Electronic mail
  68.      jpinola@cs.joensuu.fi
  69.  
  70. World-Wide Web
  71.      http://cs.joensuu.fi/~jpinola
  72.  
  73. IRC: Asa/#amigafin/#amycoders
  74.  
  75.  
  76. ****************************************
  77.  
  78.  
  79. Example usage:
  80.  
  81.  newcli from s:shell-startup window con:`DragBox`/DragShell/CLOSE
  82.  newcli from s:shell-startup window kcon:`DragBox center font times.font`/Dragbox rules/CLOSE
  83.  newcli window con:`DragBox w 300 h 100`/DragShell/CLOSE
  84.  newcli window con:`DragBox 10 10 300 100 c`/DragShell/CLOSE
  85.  newcli window con:`DragBox col_text ffffff`/DragShell/CLOSE
  86.  
  87. Or edit sys:system/shell.info
  88. and edit the tooltypes:
  89.  WINDOW=con:`DragBox w 600 h 300 c min_w 200 min_h 50`/Shell/CLOSE
  90.  
  91. You can change the return format:
  92.  DragBox format "left %ld top %ld "   (Only x,y coords)
  93.  DragBox format "x=%ld y=%ld w=%ld h=%ld"   (All coords)
  94.  
  95. Or change the environment variable:
  96.  DragBox env DRAGBOX_DEFAULTS2
  97.  
  98. To clone a window make an environment variable:
  99.  setenv DRAGBOX_CLONE "RELATIVE SIZE_FROM_ACTIVE MIDDLE"
  100. Then add a hotkey to somewhere (ie. MCP's Execute command hotkey)
  101. And se execution line to:
  102.  newcli from s:shell-startup window con:`dragbox env DRAGBOX_CLONE`/Clone Shell/CLOSE
  103.  
  104. To set alternative position for shell window:
  105.  DragBox format "%ld/%ld/%ld/%ld/%s///ALT %ld/%ld/%ld/%ld" ax +10 ay -40 aw 100 ah 400
  106. Sets alternative position to X +10 Y -40 Width 100 Height 400
  107.  
  108.  
  109. For MUI programs:
  110.  MUI_Program.exe `dragbox MUI_PREFS <name of the MUI_Program> MUI_WIN <id for window>`
  111. ie.
  112.  Miami `dragbox MUI_PREFS mui/Miami.1.prefs MUI_WIN MAIN`
  113.  Miami `dragbox MUI_PREFS mui/Miami.1.prefs MUI_WIN MAIN MUI_DEF`
  114.  Amirc `dragbox MUI_PREFS mui/AMIRC.1.prefs MUI_WIN CONN`
  115.  
  116.  
  117.  
  118.  
  119. ****************************************
  120.  
  121.  
  122. Command line parameters:
  123.  
  124. "X=DEF_X/N,Y=DEF_Y/N,W=DEF_W/N,H=DEF_H/N,C=CENTER/S,
  125.  L=LEFT/S,M=MIDDLE/S,R=RIGHT/S,F=FONT/K,FS=FSIZE/N/K,
  126.  MIW=MIN_W/N/K,MIH=MIN_H/N/K,MAW=MAX_W/N/K,MAH=MAX_H/N/K,
  127.  CBACK=COL_BACK/K,CBRIGHT=COL_BRIGHT/K,CDARK=COL_DARK/K,CSHADOW=COL_SHADOW/K,CTEXT=COL_TEXT/K,
  128.  WX=WIN_X/N/K,WY=WIN_Y/N/K,NOW=NOWIN/S,
  129.  FO=FORMAT/K,ENV/K,
  130.  TO=TIME_OUT/N/K,AD=ADRAG/S,
  131.  REL=RELATIVE/S,SFA=SIZE_FROM_ACTIVE/S,
  132.  PTS=PASSTHRU_STRING/K,AX=ALT_X/K,AY=ALT_Y/K,AW=ALT_W/K,AH=ALT_H/K,
  133.  MP=MUI_PREFS/K,MW=MUI_WIN/K,MD=MUI_DEF/S,
  134.  SHADOW_HEIGHT/N/K,LINE_PATTERN/K,LINE_DRAWMODE/N/K,
  135.  NOBLOCK/S"
  136.  
  137. X                = Default x
  138. Y                = Default y
  139. W                = Default width
  140. H                = Default height
  141. C                = Dragbox is in the middle of mouse pointer
  142. L                = Left button
  143. M                = Middle button
  144. R                = Right button
  145. F                = Name of the font
  146. FS               = Size of the font
  147. MIN_W            = Minimum width allowed
  148. MIN_H            = Minimum height allowed
  149. MAX_W            = Maximum width allowed
  150. MAX_H            = Maximum height allowed
  151. COL_BACK         = Color for background        (example COL_BACK 23ff00   is 0x23 , for red 0xff for green , and 0x00 for blue)
  152. COL_BRIGHT       = Color for bright edge of window
  153. COL_DARK         = Color for dark edge of window
  154. COL_SHADOW       = Color for shadow of text
  155. COL_TEXT         = Color for text
  156. WIN_X            = left edge coord for the coords window
  157. WIN_Y            = top edge coord for the coords window
  158. NOWIN            = no coords window
  159. FORMAT           = Format of return string. %ld for number (x,y,w,h)
  160. ENV              = Set name of the environment variable. (use only names no paths! default: DRAGBOX_DEFAULT)
  161. TIME_OUT         = dragbox time out. -1 for infinite (default is 20 intuiticks aprox)
  162. ADRAG            = Box can be dragged after resize operation
  163. RELATIVE         = Dragbox is relative to starting position of mouse
  164. SIZE_FROM_ACTIVE = Starting size is taken from currently active window (disables CENTER/S and ADRAG/S)
  165. PASSTHRU_STRING  = Puts this string to %s position in format string
  166. ALT_X            = Alternative x  (absolute values. use - or + sign to relative values)
  167. ALT_Y            = Alternative y
  168. ALT_W            = Alternative w
  169. ALT_H            = Alternative h
  170. MUI_PREFS        = For MUI programs. give location of programs MUI prefs without the ENV: or ENVARC: assign ie. "MUI/PROGRAM.1.PREFS"
  171.                    Works only when Main window is Snapshotted
  172. MUI_WIN          = ID chars for window in the MUI_PREFS file. ie. For "Miami" the main window is "MAIN"
  173.                    You must view the MUI programs .prefs file and see the window ID's (usually 4 letters at the end of the .prefs)
  174.                    Don't use if you don't no what you are doing.
  175. MUI_DEF          = Default values of the Main window from MUI_PREFS
  176.                    "Check the homepage http://cs.joensuu.fi/miu/miu.html for DragBox_IDs.txt"
  177. SHADOW_HEIGHT    = Height of the window from screen (how far the shadow is drawn from the window)
  178. LINE_PATTERN     = Line drawing pattern in hex. (16 pix pattern)
  179.                    0xFFFF full lines        {----------------} (default)
  180.                    0x0000 nothing           {                }
  181.                    0xAAAA every other dot   {- - - - - - - - }
  182.                    0xFF00                   {--------        }
  183.                    0xAA55                   {- - - -  - - - -}
  184. LINE_DRAWMODE    = Sets draw mode for the line (I'm not sure does this even alter anything)
  185.                    0 -> COMPLEMENT (default)
  186.                    1 -> COMPLEMENT | JAM2
  187. NOBLOCK          = Disables Layer locks. If you get lock ups then use this flag.
  188.  
  189. ****************************************
  190.  
  191.  
  192. Env variable:
  193.  
  194. DRAGBOX_DEFAULTS = [as command line]
  195.  
  196. Example: ( "setenv DRAGBOX_DEFAULTS DEF_W 600 MIDDLE FONT topaz.font FSIZE 8" )
  197.          ( "setenv DRAGBOX_DEFAULTS COL_SHADOW 000000 COL_TEXT ffffff" )
  198.  
  199. (copy env:DRAGBOX_DEFAULTS to envarc:)
  200.  
  201.  
  202. ****************************************
  203.  
  204. Notes and bugs:
  205.  
  206. Use middle or right mouse button with this (right is default),
  207. because WB uses left button with it's dragbox..
  208. And left button deactivates the coords window anyway, if not clicked on it,
  209. and quits dragbox.
  210.  
  211. Using very high SHADOW_HEIGHT causes window to open too big and when the window
  212. does not fit to the screen you'll get crappy window.
  213.  
  214. If your computer locks up then use NOBLOCK/S switch.
  215.  
  216. Dragbox quits when:
  217. 1. Selected button is pressed and released
  218. 2. When coord window is deactived (if you have sunpopup or something, sorry)
  219. 3. Command line and/or env variable is corrupt. (returns factory defaults)
  220. 4. Keys Return/Esc/Spacebar is pressed
  221. 5. The format string format is 4-integers 1-string 4-integers ONLY!
  222.      ie.  "%ld %ld %ld %ld %s %ld %ld %ld %ld"
  223.      NO!  "%ld %ld %s %ld %s %ld %ld"                Propably crashes
  224. 6. Atleast 4096 stack
  225.  
  226. (factory defaults:
  227. "X 0 Y 0 W 200 H 200
  228.  RIGHT FONT webfixed.font FSIZE 12
  229.  MIN_W 30 MIN_H 30 MAX_W 10000 MAX_H 10000
  230.  COL_BACK 777777 COL_BRIGHT ffffff COL_DARK 000000 COL_SHADOW 333333 COL_TEXT cccccc"
  231.  FORMAT "%ld/%ld/%ld/%ld" ENV DRAGBOX_DEFAULT
  232.  TIME_OUT 20
  233.  MUI_WIN MAIN
  234.  SHADOW_HEIGHT 4 LINE_PATTERN 0xffff LINE_DRAWMODE 0"
  235. )
  236.  
  237. ****************************************
  238.  
  239. History:
  240.  
  241. --------------
  242. v 1.8
  243.  
  244. + NOBLOCK/S added
  245. + Shadow of the coords window is hopefully working with gfxcards
  246.  
  247. --------------
  248. v 1.7
  249.  
  250. + SHADOW_HEIGHT/N/K added
  251. + LINE_PATTERN/K added
  252. + LINE_DRAWMODE/N/K added
  253. + now all gfx updates to the screen is freezed during dragbox
  254. + Shadow added to the coords window
  255. - The LockLayers() func hangs up whole computer somehow.
  256.   If someone knows how to disable screen rendering more safely
  257.   please let me know.
  258.     (Can be switched of with NOBLOCK/S)
  259.  
  260. --------------
  261. v 1.6
  262.  
  263. + MW=MUI_WIN/K added
  264. + more fixes for MUI dragging
  265.  
  266. --------------
  267. v 1.5
  268.  
  269. + MD=MUI_DEF/S added
  270. + some fix with MUI dragging
  271.  
  272. --------------
  273. v 1.4
  274.  
  275. + MP=MUI_PREFS/K added
  276.  
  277. --------------
  278. v 1.3
  279.  
  280. + PTS=PASSTHRU_STRING/K added
  281. + AX=ALT_X/K,AY=ALT_Y/K,AW=ALT_W/K,AH=ALT_H/K added
  282. - Need more stack now ?!  If you run this from Shell.info then you
  283.   should have atleast 4096 stack set. Lockup if not enough stack.
  284.  
  285. --------------
  286. v 1.2
  287.  
  288. + SFA=SIZE_FROM_ACTIVE/S added
  289. + REL=RELATIVE/S added
  290.  
  291. --------------
  292. v 1.1
  293.  
  294. + Check for too small width/height. (less than 1 x 1)
  295.  
  296. --------------
  297. v 1.00
  298.  
  299. + Less flickering lines
  300. + ADRAG/S added
  301. + TIME_OUT/N/K added
  302. + WIN_X/N/K,WIN_Y/N/K,NOWIN/S added
  303. + Some fixes
  304.  
  305. --------------
  306. v 1.00b
  307.  
  308. --------------
  309. v 0.99b
  310.  
  311. + ENV/K added
  312.  
  313. --------------
  314. v 0.99
  315.  
  316. + FORMAT/K added
  317.  
  318. --------------
  319. v 0.98
  320.  
  321. + COL_BACK/K,COL_BRIGHT/K,COL_DARK/K,COL_SHADOW/K,COL_TEXT/K added
  322. + MIN_W/N/K,MIN_H/N/K,MAX_W/N/K,MAX_H/N/K added
  323.  
  324. --------------
  325. v 0.94
  326.  
  327. + CENTER/S fixed
  328. + Only one global variable now (DRAGBOX_DEFAULTS)
  329.     Old variables are now ignored, kill them.
  330.  
  331.  
  332.